<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    #div1{
      width:400px;
      height:400px;
      background:white;
    }
    body{
      margin:0;
      background: black;
    }
  </style>
</head>
<body>
<div id="div1">
  <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
    <line x1="50" y1="50" x2="200" y2="300" stroke="black" stroke-width="5" stroke-opacity="0.5"></line>
    <!--
    stroke-opacity 透明度
    -->
  </svg>
</div>
</body>
</html>
